﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using l1cs.server.model.Instance;

namespace l1cs.server.serverpackets
{
    public class S_MoveNpcPacket : ServerBasePacket
    {
        private static Logger _log = Logger.getLogger( typeof( S_MoveNpcPacket ).FullName );

        public S_MoveNpcPacket( L1MonsterInstance npc, int x, int y, int heading )
        {
            // npc.set_moving(true);

            writeC( Opcodes.S_OPCODE_MOVEOBJECT );
            writeD( npc.getId() );
            writeH( x );
            writeH( y );
            writeC( heading );
            writeC( 0x81 );
            writeD( 0x00000000 );

            // npc.set_moving(false);
        }

        override
        public byte[] getContent()
        {
            return getBytes();
        }

        override
        public String getType()
        {
            return "[S] S_MoveNpcPacket";
        }
    }
}
